package com.ruoyi.StarStudio.Controller;

import com.ruoyi.StarStudio.Domain.AndroidUpdate;
import com.ruoyi.StarStudio.Service.AndroidUpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/update")
public class UpDateController {

    @Autowired
    AndroidUpdateService androidUpdateService;

    @GetMapping
    public int check(){
        AndroidUpdate info = androidUpdateService.getInfo();
        return info.getVersion_number();
    }

}
